package com.movitech.mobile.cz.base.purchase.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.movitech.mobile.cz.base.purchase.entity.WFlowFormSupplierAttach;
import com.movitech.mobile.cz.base.purchase.mapper.WFlowFormSupplierAttachMapper;
import com.movitech.mobile.cz.base.purchase.service.WFlowFormSupplierAttachService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 供应商与附件的关联表 服务实现类
 * </p>
 *
 * @author Movitech Mobile
 * @since 2018-04-24
 */
@Service
public class WFlowFormSupplierAttachServiceImpl extends ServiceImpl<WFlowFormSupplierAttachMapper, WFlowFormSupplierAttach> implements WFlowFormSupplierAttachService {

    @Override
    public WFlowFormSupplierAttach selectBySuplierIdAndAttachId(String supplierId, String attachId) {
        EntityWrapper entityWrapper = new EntityWrapper();
        WFlowFormSupplierAttach wFlowFormSupplierAttach = new WFlowFormSupplierAttach();
        wFlowFormSupplierAttach.setAttachmentId(attachId);
        wFlowFormSupplierAttach.setUserId(supplierId);
        entityWrapper.setEntity(wFlowFormSupplierAttach);
        return selectOne(entityWrapper);
    }
}
